if( typeof (model) == 'undefined')
	model = {}
if( typeof (model.teaching) == 'undefined')
	model.teaching = {}

if( typeof (model.teaching.factory) == 'undefined')
	model.teaching.factory = {}

function Teaching(options) {
	var settings = $.extend({
		teaching : {}
	}, options || {});
	
	
	var self = this;
	self.id = ko.observable(settings.teaching.id);
	self.person = ko.observable(settings.teaching.person);
	self.course = ko.observable(settings.teaching.course);
	self.setUpDate = ko.observable(settings.teaching.setUpDate);
	self.repeat = ko.observable(settings.teaching.repeat);
	self.star = ko.observable(settings.teaching.star);
	self.courseView = function(){
		window.location.href = "course/teachings.action?tid=" + self.course().id();
	};
	self.wantSdutyHref  = function(){
		window.location.href = "course/course-info.action?cid=" + self.course().id();
	}
	return this;
}

model.teaching.factory.create = function(options){
	return new Teaching(options)
}